<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
 
  <div id="app">
    <!-- <button v-on:click="fn">绑定一个方法</button>
    <button v-on:click="isShow=!isShow">直接修改数据</button> -->
    <button @click="fn">绑定一个方法</button>
    <button @click="isShow=!isShow">直接修改数据</button>
    {{ isShow?'真的':'假的' }}
  </div>
  <script src="./vue.js"></script>
  <script>
  
    const vm = new Vue({
      el: '#app',
      data: {
        isShow: true
      },
      methods: {
        fn(){
          this.isShow =! this.isShow;
        }
      }
    })
  
  </script>
</body>

</html>